home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / cmds / gdb-4.5 / dist / readline / Makefile.in < prev    next >
Encoding:
Makefile  |  1992-03-08  |  5.4 KB  |  209 lines

  1. #
  2. # Makefile
  3. #   Copyright (C) 1990, 1991, 1992 Free Software Foundation
  4. #
  5. # This file is free software; you can redistribute it and/or modify
  6. # it under the terms of the GNU General Public License as published by
  7. # the Free Software Foundation; either version 2 of the License, or
  8. # (at your option) any later version.
  9. # This program is distributed in the hope that it will be useful,
  10. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  12. # GNU General Public License for more details.
  13. # You should have received a copy of the GNU General Public License
  14. # along with this program; if not, write to the Free Software
  15. # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
  16. #
  17.  
  18. #
  19. # Makefile for readline and history libraries.
  20. #
  21.  
  22. srcdir = .
  23.  
  24. prefix = /usr/local
  25.  
  26. exec_prefix = $(prefix)
  27. bindir = $(exec_prefix)/bin
  28. libdir = $(exec_prefix)/lib
  29.  
  30. datadir = $(prefix)/lib
  31. mandir = $(prefix)/man
  32. man1dir = $(mandir)/man1
  33. man2dir = $(mandir)/man2
  34. man3dir = $(mandir)/man3
  35. man4dir = $(mandir)/man4
  36. man5dir = $(mandir)/man5
  37. man6dir = $(mandir)/man6
  38. man7dir = $(mandir)/man7
  39. man8dir = $(mandir)/man8
  40. man9dir = $(mandir)/man9
  41. infodir = $(prefix)/info
  42. includedir = $(prefix)/include
  43. docdir = $(datadir)/doc
  44.  
  45. SHELL = /bin/sh
  46.  
  47. INSTALL = install -c
  48. INSTALL_PROGRAM = $(INSTALL)
  49. INSTALL_DATA = $(INSTALL)
  50.  
  51. AR = ar
  52. AR_FLAGS = qv
  53. BISON = bison
  54. MAKEINFO = makeinfo
  55. RANLIB = ranlib
  56.  
  57. #### Host, target, and site specific Makefile fragments come in here.
  58. ###
  59.  
  60. # Define TYPES as -DVOID_SIGHANDLER if your operating system uses
  61. # a return type of "void" for signal handlers.
  62. TYPES = -DVOID_SIGHANDLER
  63.  
  64. # HP-UX compilation requires the BSD library.
  65. #LOCAL_LIBS = -lBSD
  66.  
  67. # Xenix compilation requires -ldir -lx
  68. #LOCAL_LIBS = -ldir -lx
  69.  
  70. # Comment out "-DVI_MODE" if you don't think that anyone will ever desire
  71. # the vi line editing mode and features.
  72. READLINE_DEFINES = $(TYPES) -DVI_MODE
  73.  
  74. MINUS_G=-g
  75. DEBUG_FLAGS = $(MINUS_G)
  76. LDFLAGS = $(DEBUG_FLAGS) 
  77. CFLAGS = $(H_CFLAGS) $(DEBUG_FLAGS) $(USG) -I. $(LOCAL_INCLUDES) $(CPPFLAGS) $(READLINE_DEFINES)
  78.  
  79. # A good alternative is gcc -traditional.
  80. #CC = gcc -traditional
  81. RM = rm
  82. CP = cp
  83.  
  84. LOCAL_INCLUDES = -I$(srcdir)/../
  85.  
  86. CSOURCES = readline.c history.c funmap.c keymaps.c vi_mode.c \
  87.        emacs_keymap.c vi_keymap.c
  88.  
  89. HSOURCES = readline.h chardefs.h history.h keymaps.h
  90. SOURCES  = $(CSOURCES) $(HSOURCES)
  91.  
  92. DOCUMENTATION = readline.texi inc-read.texi \
  93.         history.texi inc-hist.texi
  94.  
  95. SUPPORT = COPYING Makefile $(DOCUMENTATION) ChangeLog
  96.  
  97. THINGS_TO_TAR = $(SOURCES) $(SUPPORT)
  98.  
  99. ##########################################################################
  100.  
  101. STAGESTUFF = *.o
  102.  
  103. all: libreadline.a
  104.  
  105. check:
  106. info:
  107.  
  108. clean-info: force
  109.     -rm -f *.info*
  110.  
  111. history.info: $(srcdir)/history.texi
  112.     $(MAKEINFO) -o history.info $(srcdir)/history.texi
  113.  
  114. readline.info: $(srcdir)/readline.texi $(srcdir)/inc-read.texi
  115.     $(MAKEINFO) -o readline.info $(srcdir)/readline.texi
  116.  
  117. libreadline.a:    readline.o history.o funmap.o keymaps.o tilde.o vi_mode.o
  118.     $(RM) -f libreadline.a
  119.     $(AR) $(AR_FLAGS) libreadline.a readline.o history.o funmap.o keymaps.o tilde.o vi_mode.o
  120.     $(RANLIB) libreadline.a
  121.  
  122. readline.o:    readline.h chardefs.h  keymaps.h history.h readline.c vi_mode.c
  123. history.o:    history.c history.h
  124. funmap.o:    readline.h
  125. keymaps.o:    emacs_keymap.c vi_keymap.c keymaps.h chardefs.h keymaps.c
  126.  
  127. tilde.o:    $(srcdir)/../glob/tilde.c
  128.     $(CC) -c $(CFLAGS) $(srcdir)/../glob/tilde.c
  129.  
  130. libtest:    libreadline.a libtest.c
  131.     $(CC) -o libtest $(CFLAGS) $(CPPFLAGS) -L. libtest.c -lreadline -ltermcap
  132.  
  133. readline: readline.c history.o keymaps.o funmap.o readline.h chardefs.h vi_mode.o
  134.     $(CC) $(CFLAGS) $(CPPFLAGS) $(READLINE_DEFINES) \
  135.         $(LOCAL_INCLUDES) -DTEST -o readline readline.c funmap.o \
  136.          keymaps.o history.o vi_mode.o -L. -ltermcap
  137.  
  138. readline.tar:    $(THINGS_TO_TAR)
  139.         tar -cf readline.tar $(THINGS_TO_TAR)
  140.  
  141. readline.tar.Z:    readline.tar
  142.         compress -f readline.tar
  143.  
  144. install:
  145.         $(INSTALL_DATA) libreadline.a $(libdir)/libreadline.a
  146.         $(RANLIB) $(libdir)/libreadline.a
  147.         [ -d $(includedir)/readline ] || mkdir $(includedir)/readline
  148.         $(INSTALL_DATA) $(srcdir)/readline.h $(includedir)/readline/readline.h
  149.         $(INSTALL_DATA) $(srcdir)/keymaps.h $(includedir)/readline/keymaps.h
  150.         $(INSTALL_DATA) $(srcdir)/chardefs.h $(includedir)/readline/chardefs.h
  151.  
  152. install-info: info
  153. #        for i in *.info* ; do \
  154. #            $(INSTALL_DATA) $$i $(infodir)/$$i ; \
  155. #        done
  156.  
  157. includes:
  158.         if [ ! -r $(INCDIR)/readline ]; then\
  159.          mkdir $(INCDIR)/readline;\
  160.          chmod a+r $(INCDIR)/readline;\
  161.         fi
  162.         $(INSTALL_FILE) $(srcdir)/readline.h $(INCDIR)/readline/
  163.         $(INSTALL_FILE) $(srcdir)/keymaps.h $(INCDIR)/readline/
  164.         $(INSTALL_FILE) $(srcdir)/chardefs.h $(INCDIR)/readline/
  165. clean:
  166.         rm -f $(STAGESTUFF) *.a *.log *.cp *.tp *.vr *.fn
  167.         rm -f *.aux *.pg *.toc
  168.  
  169. $(DESTDIR)/libreadline.a: libreadline.a
  170.  
  171. # Copy the object files from a particular stage into a subdirectory.
  172. stage1: force
  173.     -mkdir stage1
  174.     -mv $(STAGESTUFF) stage1
  175.  
  176. stage2: force
  177.     -mkdir stage2
  178.     -mv $(STAGESTUFF) stage2
  179.  
  180. stage3: force
  181.     -mkdir stage3
  182.     -mv $(STAGESTUFF) stage3
  183.  
  184. against=stage2
  185.  
  186. comparison: force
  187.     for i in $(STAGESTUFF) ; do cmp $$i $(against)/$$i ; done
  188.  
  189. de-stage1: force
  190.     -(cd stage1 ; mv -f * ..)
  191.     -rmdir stage1
  192.  
  193. de-stage2: force
  194.     -(cd stage2 ; mv -f * ..)
  195.     -rmdir stage2
  196.  
  197. de-stage3: force
  198.     -(cd stage3 ; mv -f * ..)
  199.     -rmdir stage3
  200.  
  201. force:
  202.  
  203. # with the gnu make, this is done automatically.
  204.  
  205. Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag)
  206.     $(SHELL) ./config.status
  207.